//
//  WBDemoViewController.swift
//  郑好微博
//
//  Created by WF on 2017/6/5.
//  Copyright © 2017年 WF. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "第 \(navigationController?.viewControllers.count ?? 0) 个"
    }
    
    // MARK: - 监听方法
    
    /// 继续 PUSH 一个新的控制器
    @objc fileprivate func showNext() {
        
        let vc = WBDemoViewController()
        
        navigationController?.pushViewController(vc, animated: true)
    }

}

extension WBDemoViewController {
    
    // 重写父类的方法
    override func setupTableView() {
        
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }
}
